From bb1b501db55ea6e0cb4d1fba6a74bb0044ca429c Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Sun, 18 Jan 2009 15:14:59 +0000 Subject: [PATCH] Do a s/babl_destroy/babl_exit since 'destroy' is better paired with a 'create' and other libraries also use the 'init'/'exit' pair, including GEGL. Keep a define for babl_destroy unless BABL_DISABLE_DEPRECATED is defined. * babl/babl-main.h * babl/babl.c * tests/babl-html-dump.c * tests/babl_class_name.c * tests/babl_fish_path_dhtml.c * tests/babl_fish_path_fitness.c * tests/conversions.c * tests/formats.c * tests/grayscale_to_rgb.c * tests/introspect.c * tests/models.c * tests/nop.c * tests/rgb_to_bgr.c * tests/rgb_to_ycbcr.c * tests/sanity.c * tests/srgb_to_lab_u8.c * tests/types.c svn path=/trunk/; revision=386 --- ChangeLog | 25 +++++++++++++++++++++++++ babl/babl-main.h | 21 ++++++++++++++++----- babl/babl.c | 2 +- tests/babl-html-dump.c | 2 +- tests/babl_class_name.c | 2 +- tests/babl_fish_path_dhtml.c | 2 +- tests/babl_fish_path_fitness.c | 2 +- tests/conversions.c | 2 +- tests/formats.c | 2 +- tests/grayscale_to_rgb.c | 2 +- tests/introspect.c | 2 +- tests/models.c | 2 +- tests/nop.c | 2 +- tests/rgb_to_bgr.c | 2 +- tests/rgb_to_ycbcr.c | 2 +- tests/sanity.c | 2 +- tests/srgb_to_lab_u8.c | 2 +- tests/types.c | 2 +- 18 files changed, 57 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd88020..7457178 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2009-01-18 Martin Nordholts + + Do a s/babl_destroy/babl_exit since 'destroy' is better paired + with a 'create' and other libraries also use the 'init'/'exit' + pair, including GEGL. Keep a define for babl_destroy unless + BABL_DISABLE_DEPRECATED is defined. + + * babl/babl-main.h + * babl/babl.c + * tests/babl-html-dump.c + * tests/babl_class_name.c + * tests/babl_fish_path_dhtml.c + * tests/babl_fish_path_fitness.c + * tests/conversions.c + * tests/formats.c + * tests/grayscale_to_rgb.c + * tests/introspect.c + * tests/models.c + * tests/nop.c + * tests/rgb_to_bgr.c + * tests/rgb_to_ycbcr.c + * tests/sanity.c + * tests/srgb_to_lab_u8.c + * tests/types.c + 2009-01-18 Martin Nordholts * babl/babl-classes.h: New file collecting the type constants, diff --git a/babl/babl-main.h b/babl/babl-main.h index e0a7fa3..8cfafa5 100644 --- a/babl/babl-main.h +++ b/babl/babl-main.h @@ -23,13 +23,24 @@ #error this file is only to be included by babl.h #endif -/** Initialize the babl library */ +/** + * Initialize the babl library + */ void babl_init (void); -/** Deinitialize the babl library (frees any resources used, if the number - * of calls to babl_destroy() is is equal to the number of calls to - * babl_init() +/** + * Deinitialize the babl library (frees any resources used, if the + * number of calls to babl_exit() is is equal to the number of calls + * to babl_init() */ -void babl_destroy (void); +void babl_exit (void); + + +#ifndef BABL_DISABLE_DEPRECATED + +#define babl_destroy babl_exit + +#endif /* BABL_DISABLE_DEPRECATED */ + #endif diff --git a/babl/babl.c b/babl/babl.c index a64a7ee..91ccb17 100644 --- a/babl/babl.c +++ b/babl/babl.c @@ -46,7 +46,7 @@ babl_init (void) } void -babl_destroy (void) +babl_exit (void) { if (!-- ref_count) { diff --git a/tests/babl-html-dump.c b/tests/babl-html-dump.c index b415487..1f3def8 100644 --- a/tests/babl-html-dump.c +++ b/tests/babl-html-dump.c @@ -79,7 +79,7 @@ main (void) printf ("\n"); printf ("\n"); */ - babl_destroy (); + babl_exit (); return 0; } diff --git a/tests/babl_class_name.c b/tests/babl_class_name.c index a8d3001..01e1c41 100644 --- a/tests/babl_class_name.c +++ b/tests/babl_class_name.c @@ -68,6 +68,6 @@ main (int argc, babl_init (); if (test ()) return -1; - babl_destroy (); + babl_exit (); return 0; } diff --git a/tests/babl_fish_path_dhtml.c b/tests/babl_fish_path_dhtml.c index 9405fc8..b9f52f5 100644 --- a/tests/babl_fish_path_dhtml.c +++ b/tests/babl_fish_path_dhtml.c @@ -8,7 +8,7 @@ int main (void) babl_set_extender (babl_extension_quiet_log ()); babl_fish_stats (stdout); - babl_destroy (); + babl_exit (); return 0; } diff --git a/tests/babl_fish_path_fitness.c b/tests/babl_fish_path_fitness.c index f423f00..9ac312f 100644 --- a/tests/babl_fish_path_fitness.c +++ b/tests/babl_fish_path_fitness.c @@ -89,7 +89,7 @@ int main (void) /*printf ("ok / total : %i %i %f\n", ok, total, (1.0*ok) / total); */ - babl_destroy (); + babl_exit (); return 0; } diff --git a/tests/conversions.c b/tests/conversions.c index 2e05983..9efe2c6 100644 --- a/tests/conversions.c +++ b/tests/conversions.c @@ -30,7 +30,7 @@ int main (void) babl_set_extender (babl_extension_quiet_log ()); babl_conversion_class_for_each (each_conversion, NULL); - babl_destroy (); + babl_exit (); return !OK; } diff --git a/tests/formats.c b/tests/formats.c index 9bf9b9d..a3852f7 100644 --- a/tests/formats.c +++ b/tests/formats.c @@ -20,7 +20,7 @@ int main (void) babl_set_extender (babl_extension_quiet_log ()); babl_format_class_for_each (format_check, (void *) 1); - babl_destroy (); + babl_exit (); return 0; } diff --git a/tests/grayscale_to_rgb.c b/tests/grayscale_to_rgb.c index 00a150b..698cdd9 100644 --- a/tests/grayscale_to_rgb.c +++ b/tests/grayscale_to_rgb.c @@ -76,7 +76,7 @@ main (int argc, babl_init (); if (test ()) return -1; - babl_destroy (); + babl_exit (); return 0; } diff --git a/tests/introspect.c b/tests/introspect.c index 1734c3b..fb5b8fc 100644 --- a/tests/introspect.c +++ b/tests/introspect.c @@ -24,6 +24,6 @@ main (int argc, { babl_init (); babl_introspect (NULL); - babl_destroy (); + babl_exit (); return 0; } diff --git a/tests/models.c b/tests/models.c index f54dca7..1922a35 100644 --- a/tests/models.c +++ b/tests/models.c @@ -27,7 +27,7 @@ int main (void) babl_set_extender (babl_extension_quiet_log ()); babl_model_class_for_each (model_check, NULL); - babl_destroy (); + babl_exit (); return !OK; } diff --git a/tests/nop.c b/tests/nop.c index ca21591..883d9d8 100644 --- a/tests/nop.c +++ b/tests/nop.c @@ -23,6 +23,6 @@ main (int argc, char **argv) { babl_init (); - babl_destroy (); + babl_exit (); return 0; } diff --git a/tests/rgb_to_bgr.c b/tests/rgb_to_bgr.c index fd5cab5..a60bca5 100644 --- a/tests/rgb_to_bgr.c +++ b/tests/rgb_to_bgr.c @@ -84,6 +84,6 @@ main (int argc, babl_init (); if (test ()) return -1; - babl_destroy (); + babl_exit (); return 0; } diff --git a/tests/rgb_to_ycbcr.c b/tests/rgb_to_ycbcr.c index 4928a6f..efee80c 100644 --- a/tests/rgb_to_ycbcr.c +++ b/tests/rgb_to_ycbcr.c @@ -91,6 +91,6 @@ main (int argc, babl_init (); if (test ()) return -1; - babl_destroy (); + babl_exit (); return 0; } diff --git a/tests/sanity.c b/tests/sanity.c index e2798e3..482f218 100644 --- a/tests/sanity.c +++ b/tests/sanity.c @@ -25,6 +25,6 @@ main (int argc, babl_init (); if (!babl_sanity ()) return -1; - babl_destroy (); + babl_exit (); return 0; } diff --git a/tests/srgb_to_lab_u8.c b/tests/srgb_to_lab_u8.c index fe41972..8d7c7b7 100644 --- a/tests/srgb_to_lab_u8.c +++ b/tests/srgb_to_lab_u8.c @@ -71,6 +71,6 @@ main (int argc, babl_init (); if (test ()) return -1; - babl_destroy (); + babl_exit (); return 0; } diff --git a/tests/types.c b/tests/types.c index 8a7551d..9e53d24 100644 --- a/tests/types.c +++ b/tests/types.c @@ -21,7 +21,7 @@ int main (void) babl_set_extender (babl_extension_quiet_log ()); babl_type_class_for_each (type_check, NULL); - babl_destroy (); + babl_exit (); return !OK; } -- 2.30.2